package com.chanel.iamframework.core.domain;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotNull;

public class Group {
	
    private Long groupId;

    private String groupName;

    private String groupLabel;

    private String groupDescription;

    private List<Role> roles = new ArrayList<Role>();
    
    private List<User> users = new ArrayList<User>();
    
    private List<Application> applications = new ArrayList<Application>();
    
    public Group() {}
    
    public Group(String groupName, String groupLabel, String groupDescription) {
		this.groupName = groupName;
		this.groupLabel = groupLabel;
		this.groupDescription = groupDescription;
	}
    
    public Group(String groupName, String groupLabel) {
    	this(groupName, groupLabel, null);
	}
    
    public List<Application> getApplications() {
		return applications;
	}

	public void setApplications(List<Application> applications) {
		this.applications = applications;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

	public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(@NotNull Long groupId) {
        this.groupId = groupId;
    }

    @NotNull 
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(@NotNull String groupName) {
        this.groupName = groupName;
    }

    @NotNull 
    public String getGroupLabel() {
        return groupLabel;
    }

    public void setGroupLabel(@NotNull String groupLabel) {
        this.groupLabel = groupLabel;
    }

    public String getGroupDescription() {
        return groupDescription;
    }

    public void setGroupDescription(String groupDescription) {
        this.groupDescription = groupDescription;
    }
    
    @Override
    public String toString() {
    	return "Group ==> {" +
    			"groupId = " + groupId +
    			", groupName = " + groupName +
    			", groupLabel = " + groupLabel +
    			", groupDescription = " + groupDescription +
    			"}";
    }
}